interface IListBase {
  title: string
  type: number
  distribution: string
  worker: string
  endTime?: number
  description?: string
}

interface IListItem extends IListBase {
  readonly id: string
  finished: boolean
  important: boolean
  owner: string
  createdBy: string
  createdAt: number
  updatedAt?: number
}

interface ICreateListDto extends IListBase {
  important?: boolean
}

interface IGetListDto {
  limit: number
  pageId: number
}

interface IUpdateListDto extends Partial<ICreateListDto> {
  id: string
}

enum PageId {
  'home',
  'main',
  'plan',
  'distribution',
  'assign',
  'task'
}

type IPageIdToPayloadMap = {
  [key in PageId]: {
    type: number
    distribution?: string
  }
}

export { PageId }
export type { IListItem, ICreateListDto, IGetListDto, IUpdateListDto, IPageIdToPayloadMap }
